package com.cyzy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cyzy.pojo.Course;
import com.cyzy.pojo.Seckill;

import java.util.List;
import java.util.Map;

public interface SecKillService extends IService<Seckill> {

    List<Seckill> getAllSecKill();

    Seckill queryDetailBySeckillId(Long seckillId);

    Course queryCourseById(Long courseId);

    Boolean queryStuAuthen(Long studentId);

    //生成一条新的秒杀订单(用户ID，秒杀ID，课程ID,订单金额，创建时间，支付状态)
    Long insertOrderBySecKill(Map<String,Object> map);

    //修改秒杀活动信息的状态为结束
    int updateSeckillStatus(Long seckillId,String status);

    //在学生课程表中新增一条记录
    int insertStudentCourse(Map<String,Object> map);

    //查询用户的限购情况
    boolean queryUserLimit(Long studentId,Long seckillId,Long limitCount);
}
